/*
 *
 *  * Copyright (c) 2016. For Intelligent Group.
 *
 */

package com.intelligent.ispc.config;

import com.intelligent.ispc.client.utils.ApplicationBeanUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Created by Peter on 2016/8/16.
 */
@Configuration
@Component
public class BeanConfig {

    /**
     * Init a application bean utils instance.
     * @param applicationContext Spring application context object
     * @return ApplicationBeanUtils
     */
    @Bean
    public ApplicationBeanUtils applicationBeanUtils(ApplicationContext applicationContext) {
        ApplicationBeanUtils applicationBeanUtils = new ApplicationBeanUtils();
        applicationBeanUtils.setApplicationContext(applicationContext);
        return applicationBeanUtils;
    }
}
